<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
<title>source\jindo.TabControl.js - Jindo Component - AjaxUI@NHN</title>
<link rel="stylesheet" type="text/css" href="../assets/prettify/prettify-min.css" media="screen">
<script type="text/javascript">
	var isMobile = (function() {
		var r = window.devicePixelRatio || 1;
		if (/windows phone/i.test(navigator.userAgent)) { r = 2; }
		
		var s = Math.max(screen.width / r, screen.height / r);
		
		var m = s < 1024;
		var href = m ? "api.mobile.css" : "api.css";
		document.write('<link rel="stylesheet" type="text/css" href="../assets/' + href + '" media="screen">');
		
		return m;
	})();
</script>

<script type="text/javascript" src="../assets/jindo.desktop.min.js"></script>
<script type="text/javascript" src="../assets/jindo_component.min.js"></script>
</head>
<body class="api-page">
<div id="wrap" class="api-main"><!-- 2Depth 접기 : lft_fold 추가 -->

	<div id="header">
		<h1><a href="../index.html"><span class="blind">JindoJS</span></a></h1>
		<div class="info">
			<span class="version">version 1.6.0</span>
			<span class="bar">|</span>
			<span class="help"><span class="ic_help"></span><a href="http://devcode.nhncorp.com/projects/jindo-component/issue" target="_blank">버그신고/문의</a></span>
		</div>
		<div class="menu">
			<button type="button" id="toggle_search_btn" class="btn_sch"><span class="blind">검색</span></button>
			<button type="button" id="toggle_list_btn" class="btn_snb btn_snb_on"><span class="blind">메뉴</span></button>
			<!-- [D] 클릭시 btn_sch_on,btn_snb_on 추가 -->
		</div>
	</div>

	<!-- sch_frm -->
	<div class="sch_frm hide_when_small">
		<h2 class="blind">검색</h2>
		<div class="filter">
			<input type="search" id="api-filter" placeholder="검색어를 입력하세요.">
		</div>
		<div id="search-tab" style="display:none;">
			<ul class="tabs">
			<li class="tc-tab">전체</li>
			<li class="tc-tab">키워드</li>
			<li class="tc-tab">클래스</li>
			<li class="tc-tab">메서드</li>
			<li class="tc-tab">프로퍼티</li>
			<li class="tc-tab">이벤트</li>
			</ul>
			<div class="panels">
				<ul id="api-all" class="tc-panel"></ul>
				<ul id="api-keywords" class="tc-panel"></ul>
				<ul id="api-classes" class="tc-panel"></ul>
				<ul id="api-methods" class="tc-panel"></ul>
				<ul id="api-attrs" class="tc-panel"></ul>
				<ul id="api-events" class="tc-panel"></ul>
			</div>

		</div>
	</div>
	<!-- // sch_frm -->

	<!-- container -->
	<div id="container">
		<!-- left-columns -->
		<div id="left-columns" class="sidemenu has_scrollbar">
			<h2 class="blind"><a href="../index.html"><span>APIs</span></a></h2>
<div class="snb depth1 scrollbar hide_when_small">
	<!-- [D] style="width:135px; height:384px; -->
	<div class="scrollbar-box">
		<div class="scrollbar-content">
			<div><ul>
			            <li class="">
			            	<a href="../classes/jindo.Accordion.html" class="">
			                	Accordion
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.AjaxHistory.html" class="">
			                	AjaxHistory
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.BrowseButton.html" class="">
			                	BrowseButton
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Cache.html" class="">
			                	Cache
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Calendar.html" class="">
			                	Calendar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Canvas.html" class="">
			                	Canvas
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CheckBox.html" class="">
			                	CheckBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CircularRolling.html" class="">
			                	CircularRolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Clipboard.html" class="">
			                	Clipboard
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Component.html" class="">
			                	Component
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DataBridge.html" class="">
			                	DataBridge
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DatePicker.html" class="">
			                	DatePicker
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DefaultTextValue.html" class="">
			                	DefaultTextValue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Dialog.html" class="">
			                	Dialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DragArea.html" class="">
			                	DragArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DropArea.html" class="">
			                	DropArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DynamicTree.html" class="">
			                	DynamicTree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Effect.html" class="">
			                	Effect
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FileUploader.html" class="">
			                	FileUploader
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FloatingLayer.html" class="">
			                	FloatingLayer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Foggy.html" class="">
			                	Foggy
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Formatter.html" class="">
			                	Formatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.HTMLComponent.html" class="">
			                	HTMLComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.InlineTextEdit.html" class="">
			                	InlineTextEdit
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerEffect.html" class="">
			                	LayerEffect
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerManager.html" class="">
			                	LayerManager
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerPosition.html" class="">
			                	LayerPosition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LazyLoading.html" class="">
			                	LazyLoading
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ModalDialog.html" class="">
			                	ModalDialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MouseGesture.html" class="">
			                	MouseGesture
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MultipleAjaxRequest.html" class="">
			                	MultipleAjaxRequest
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumberFormatter.html" class="">
			                	NumberFormatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumericStepper.html" class="">
			                	NumericStepper
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Pagination.html" class="">
			                	Pagination
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Rolling.html" class="">
			                	Rolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RollingChart.html" class="">
			                	RollingChart
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverArea.html" class="">
			                	RolloverArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverClick.html" class="">
			                	RolloverClick
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBar.html" class="">
			                	ScrollBar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBox.html" class="">
			                	ScrollBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectArea.html" class="">
			                	SelectArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectBox.html" class="">
			                	SelectBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Slider.html" class="">
			                	Slider
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.StarRating.html" class="">
			                	StarRating
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TabControl.html" class="">
			                	TabControl
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TextRange.html" class="">
			                	TextRange
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Timer.html" class="">
			                	Timer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Transition.html" class="">
			                	Transition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Tree.html" class="">
			                	Tree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UIComponent.html" class="">
			                	UIComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UploadQueue.html" class="">
			                	UploadQueue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.WatchInput.html" class="">
			                	WatchInput
								
								

							    
						        
			            	</a>
			            </li>
			        </ul></div>
		</div>
	</div>
	<div class="scrollbar-v">
		<div class="scrollbar-button-up"></div>
		<div class="scrollbar-track">
			<div class="scrollbar-thumb" style="top: 0px; height: 222px; "></div>
		</div>
		<div class="scrollbar-button-down"></div>
	</div>
</div>


<button type="button" title="펼치기" class="btn_open">바로가기 열기<span class="ic"></span></button>
<button type="button" title="접기" class="btn_close">바로가기 닫기<span class="ic"></span></button>

		</div>
		<!-- // left-columns -->

		<!-- main content -->
		<div id="main">
			<div class="main_fix">
				<div class="content">
	
	<h1 class="blind">source/jindo.TabControl.js</h1>
	<div class="tc-panel first">
		<dl class="relation">
			<dt>파일명</dt>
			<dd>jindo.TabControl.js</dd>
			<dt>경로</dt>
			<dd>source/</dd>
		</dl>
		<div id="file" class="file">
		    <pre class="code prettyprint linenums">/**
	@fileOverview&nbsp;탭이동을&nbsp;구현한&nbsp;컴포넌트
	@author&nbsp;hooriza,&nbsp;modified&nbsp;by&nbsp;senxation
	@version&nbsp;#__VERSION__#
**/
/**
	jindo.TabControl&nbsp;컴포넌트는&nbsp;여러&nbsp;패널로&nbsp;나뉘어진&nbsp;구조를&nbsp;탭으로&nbsp;네비게이팅&nbsp;가능하게&nbsp;합니다.
	
	@class&nbsp;jindo.TabControl
	@extends&nbsp;jindo.UIComponent
	@keyword&nbsp;tabcontrol,&nbsp;탭컨트롤
**/
jindo.TabControl&nbsp;=&nbsp;jindo.$Class({
	/**&nbsp;@lends&nbsp;jindo.TabControl.prototype&nbsp;*/

	_bIsActivating&nbsp;:&nbsp;false,&nbsp;//컴포넌트의&nbsp;활성화&nbsp;여부

	_nCurrentIndex&nbsp;:&nbsp;null,&nbsp;//현재&nbsp;선택된&nbsp;탭의&nbsp;인덱스
	_welSelectedTab&nbsp;:&nbsp;null,
	_welSelectedPanel&nbsp;:&nbsp;null,
	
	/**
		TabControl&nbsp;컴포넌트를&nbsp;생성한다.
		
		@constructor
		@param&nbsp;{HTMLElement}&nbsp;el&nbsp;TabControl을&nbsp;적용한&nbsp;기준&nbsp;엘리먼트.
		@param&nbsp;{Object}&nbsp;[htOption]&nbsp;옵션&nbsp;객체
			@param&nbsp;{String}&nbsp;[htOption.sClassPrefix=&quot;tc-&quot;]&nbsp;클래스명&nbsp;접두어
			@param&nbsp;{String}&nbsp;[htOption.sCheckEvent=&quot;click&quot;]&nbsp;탭에&nbsp;적용될&nbsp;이벤트
			&lt;ul&gt;
			&lt;li&gt;&quot;mouseover&quot;&lt;/li&gt;
			&lt;li&gt;&quot;mousedown&quot;&lt;/li&gt;
			&lt;li&gt;&quot;click&quot;&lt;/li&gt;
			&lt;/ul&gt;
			@param&nbsp;{Boolean}&nbsp;[htOption.bActivateOnload=true]&nbsp;로드시&nbsp;activate()&nbsp;수행여부
		@example
			&lt;!--
				기준&nbsp;엘리먼트는&nbsp;반드시&nbsp;같은&nbsp;수의&nbsp;classPrefix+&quot;tab&quot;,&nbsp;classPrefix+&quot;panel&quot;&nbsp;쌍을&nbsp;가져야하고&nbsp;각&nbsp;쌍은&nbsp;특정&nbsp;엘리먼트로&nbsp;감싸져있어야한다.
				아래&nbsp;예&nbsp;참고.
			--&gt;
			&lt;div&nbsp;id=&quot;tab&quot;&gt;
				&lt;ul&gt;
					&lt;li&nbsp;class=&quot;tc-tab&quot;&gt;첫번째&lt;/li&gt;&nbsp;&lt;!--&nbsp;tab의&nbsp;클래스명은&nbsp;옵션의&nbsp;classPrefix+&quot;tab&quot;으로&nbsp;정해야한다.&nbsp;--&gt;
					&lt;li&nbsp;class=&quot;tc-tab&nbsp;tc-selected&quot;&gt;두번째&lt;/li&gt;&nbsp;&lt;!--&nbsp;default로&nbsp;선택될&nbsp;탭을&nbsp;지정할&nbsp;경우&nbsp;tab의&nbsp;클래스명은&nbsp;옵션의&nbsp;classPrefix+&quot;selected&quot;으로&nbsp;정한다.&nbsp;(탭이&nbsp;선택되었을&nbsp;때&nbsp;해당&nbsp;탭과&nbsp;매칭되는&nbsp;패널은&nbsp;classPrefix+&quot;selected&quot;의&nbsp;클래스명을&nbsp;갖게&nbsp;된다.)&nbsp;--&gt;
					&lt;li&nbsp;class=&quot;tc-tab&quot;&gt;세번째&lt;/li&gt;
				&lt;/ul&gt;
				&lt;div&gt;
					&lt;div&nbsp;class=&quot;tc-panel&quot;&gt;SUB&nbsp;SUB&nbsp;#1&lt;/li&gt;&nbsp;&lt;!--&nbsp;tab이&nbsp;선택되었을때&nbsp;보여지는&nbsp;panel의&nbsp;클래스명은&nbsp;옵션의&nbsp;classPrefix+&quot;panel&quot;으로&nbsp;정해야한다.&nbsp;--&gt;
					&lt;div&nbsp;class=&quot;tc-panel&nbsp;tc-selected&quot;&gt;SUB&nbsp;SUB&nbsp;#2&lt;/li&gt;&nbsp;&lt;!--&nbsp;default로&nbsp;선택될&nbsp;탭을&nbsp;지정할&nbsp;경우&nbsp;panel의&nbsp;클래스명은&nbsp;옵션의&nbsp;classPrefix+&quot;selected&quot;으로&nbsp;정한다.&nbsp;--&gt;
					&lt;div&nbsp;class=&quot;tc-panel&quot;&gt;SUB&nbsp;SUB&nbsp;#3&lt;/li&gt;
				&lt;/div&gt;
			&lt;/div&gt;
		@example
			var&nbsp;oTab&nbsp;=&nbsp;new&nbsp;jindo.TabControl(jindo.$(&#39;tab&#39;),&nbsp;{&nbsp;
				sClassPrefix&nbsp;:&nbsp;&quot;tc-&quot;&nbsp;//&nbsp;(String)&nbsp;클래스명&nbsp;앞에&nbsp;붙게되는&nbsp;prefix&nbsp;선언
				sCheckEvent&nbsp;:&nbsp;&quot;click&quot;,&nbsp;//탭에&nbsp;적용될&nbsp;이벤트&nbsp;(&quot;mouseover&quot;,&nbsp;&quot;mousedown&quot;,&nbsp;&quot;click&quot;)
				bActivateOnload&nbsp;:&nbsp;true&nbsp;//로드시&nbsp;컴포넌트&nbsp;활성화여부
			}).attach({
				beforeSelect&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//탭이&nbsp;선택되기&nbsp;전에&nbsp;발생
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//&nbsp;	nIndex&nbsp;:&nbsp;(Number)&nbsp;선택된&nbsp;탭의&nbsp;인덱스
					//&nbsp;	elTab&nbsp;:&nbsp;(HTMLElement)&nbsp;선택된&nbsp;탭
					//&nbsp;	elPanel&nbsp;:&nbsp;(HTMLElement)&nbsp;선택된&nbsp;패널
					//}
					//oCustomEvent.stop()시&nbsp;해당&nbsp;탭이&nbsp;선택되지&nbsp;않음.
				}
				select&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//탭이&nbsp;선택되었을&nbsp;때&nbsp;발생
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//&nbsp;	nIndex&nbsp;:&nbsp;(Number)&nbsp;선택된&nbsp;탭의&nbsp;인덱스
					//&nbsp;	elTab&nbsp;:&nbsp;(HTMLElement)&nbsp;선택된&nbsp;탭
					//&nbsp;	elPanel&nbsp;:&nbsp;(HTMLElement)&nbsp;선택된&nbsp;패널
					//}
				}
			});
	**/
	$init&nbsp;:&nbsp;function(el,&nbsp;htOption)&nbsp;{
		
		//옵션&nbsp;초기화
		var&nbsp;htDefaultOption&nbsp;=&nbsp;{
			sClassPrefix&nbsp;:&nbsp;&#39;tc-&#39;,&nbsp;//Default&nbsp;Class&nbsp;Prefix
			sCheckEvent&nbsp;:&nbsp;&quot;click&quot;,&nbsp;//탭에&nbsp;적용될&nbsp;이벤트&nbsp;(&quot;mouseover&quot;,&nbsp;&quot;mousedown&quot;,&nbsp;&quot;click&quot;)
			bActivateOnload&nbsp;:&nbsp;true&nbsp;//로드시&nbsp;컴포넌트&nbsp;활성화여부
		};
		this.option(htDefaultOption);
		this.option(htOption&nbsp;||&nbsp;{});
		
		//Base&nbsp;엘리먼트&nbsp;설정
		this._el&nbsp;=&nbsp;jindo.$(el);
		
		this._wfEventTab&nbsp;=&nbsp;jindo.$Fn(this._onEventTab,&nbsp;this);

		//컴포넌트에서&nbsp;사용되는&nbsp;HTMLElement들을&nbsp;선언하는&nbsp;메서드
		this._assignHTMLElements();
		
		//활성화
		if(this.option(&quot;bActivateOnload&quot;))&nbsp;{
			this._selectTab(this._elSelectedTab);
			this.activate();&nbsp;//컴포넌트를&nbsp;활성화한다.	
		}
	},
	
	/**
		컴포넌트에서&nbsp;사용되는&nbsp;HTMLElement들을&nbsp;선언하는&nbsp;메서드
	**/
	_assignHTMLElements&nbsp;:&nbsp;function()&nbsp;{
		var&nbsp;sPrefix&nbsp;=&nbsp;this.option(&#39;sClassPrefix&#39;),
			el&nbsp;=&nbsp;this._el;
		
		this._aTab&nbsp;=&nbsp;jindo.$$(&#39;.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;tab&#39;,&nbsp;el);
		this._aPanel&nbsp;=&nbsp;jindo.$$(&#39;.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;panel&#39;,&nbsp;el);
		this._elSelectedTab&nbsp;=&nbsp;jindo.$$.getSingle(&#39;.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;tab.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;selected&#39;,&nbsp;el)&nbsp;||&nbsp;this.getTab(0);
		this._waTab&nbsp;=&nbsp;jindo.$A(this._aTab);
	},
	
	/**
		n번째&nbsp;탭&nbsp;엘리먼트를&nbsp;구한다.
		
		@method&nbsp;getTab
		@param&nbsp;{Number}&nbsp;n&nbsp;몇&nbsp;번째&nbsp;탭&nbsp;엘리먼트인지
		@return&nbsp;{HTMLElement}
	**/
	getTab&nbsp;:&nbsp;function(n)&nbsp;{
		return&nbsp;this.getTabs()[n];
	},

	/**
		탭&nbsp;엘리먼트&nbsp;목록을&nbsp;구한다.
		
		@method&nbsp;getTabs
		@return&nbsp;{Array}
	**/
	getTabs&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;this._aTab;
	},

	/**
		n번째&nbsp;패널&nbsp;엘리먼트를&nbsp;구한다.
		
		@method&nbsp;getPanel
		@param&nbsp;{Number}&nbsp;n&nbsp;몇&nbsp;번째&nbsp;패널&nbsp;엘리먼트인지
		@return&nbsp;{HTMLElement}
	**/
	getPanel&nbsp;:&nbsp;function(n)&nbsp;{
		return&nbsp;this.getPanels()[n];
	},

	/**
		패널&nbsp;엘리먼트&nbsp;목록을&nbsp;구한다.
		
		@method&nbsp;getPanels
		@return&nbsp;{Array}
	**/
	getPanels&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;this._aPanel;
	},

	/**
		n번째&nbsp;Tab을&nbsp;선택한다.
		
		@method&nbsp;selectTab
		@param&nbsp;{Number}&nbsp;n&nbsp;몇&nbsp;번째&nbsp;탭인지
		@param&nbsp;{Boolean}&nbsp;bFireEvent&nbsp;선택시&nbsp;사용자&nbsp;이벤트를&nbsp;발생할&nbsp;지&nbsp;여부
	**/
	selectTab&nbsp;:&nbsp;function(n,&nbsp;bFireEvent)&nbsp;{
		if&nbsp;(typeof&nbsp;bFireEvent&nbsp;==&nbsp;&quot;undefined&quot;)&nbsp;{
			bFireEvent&nbsp;=&nbsp;true;
		}
		
		this._selectTab(this.getTab(n),&nbsp;bFireEvent);
	},

	/**
		몇&nbsp;번째&nbsp;탭인지&nbsp;구한다.
		
		@method&nbsp;getIndex
		@param&nbsp;{HTMLElement}&nbsp;elTab&nbsp;탭&nbsp;엘리먼트
		@return&nbsp;{Number}
	**/	
	getIndex&nbsp;:&nbsp;function(elTab)&nbsp;{
		return&nbsp;this._waTab.indexOf(elTab);
	},
	
	/**
		현재&nbsp;몇번째&nbsp;탭이&nbsp;보여지고&nbsp;있는지&nbsp;구한다.
		
		@method&nbsp;getCurrentIndex
		@return&nbsp;{Number}
	**/
	getCurrentIndex&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;this._nCurrentIndex;
	},
	
	_selectTab&nbsp;:&nbsp;function(elTab,&nbsp;bFireEvent)&nbsp;{
		if&nbsp;(typeof&nbsp;bFireEvent&nbsp;==&nbsp;&quot;undefined&quot;)&nbsp;{
			bFireEvent&nbsp;=&nbsp;true;	
		}
		
		var&nbsp;sPrefix&nbsp;=&nbsp;this.option(&#39;sClassPrefix&#39;),
			nIndex&nbsp;=&nbsp;this.getIndex(elTab),
			elPanel&nbsp;=&nbsp;this.getPanel(nIndex);
		
		if&nbsp;(bFireEvent)&nbsp;{
			/**
				탭이&nbsp;선택되기&nbsp;전
				
				@event&nbsp;beforeSelect
				@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
				@param&nbsp;{Number}&nbsp;nIndex&nbsp;선택될&nbsp;탭의&nbsp;인덱스
				@param&nbsp;{HTMLElement}&nbsp;elTab&nbsp;선택될&nbsp;탭
				@param&nbsp;{HTMLElement}&nbsp;elPanel&nbsp;선택될&nbsp;패널
				@param&nbsp;{Function}&nbsp;stop&nbsp;수행시&nbsp;해당&nbsp;탭이&nbsp;선택되지&nbsp;않음
				@example
					//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
					oTabControl.attach(&quot;beforeSelect&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
			**/
			if&nbsp;(!this.fireEvent(&quot;beforeSelect&quot;,&nbsp;{
				nIndex&nbsp;:&nbsp;nIndex,
				elTab&nbsp;:&nbsp;elTab,
				elPanel&nbsp;:&nbsp;elPanel
			}))&nbsp;{
				return;
			}
		}
		
		var&nbsp;welTab&nbsp;=&nbsp;jindo.$Element(elTab);
		if&nbsp;(this._welSelectedTab)&nbsp;{
			this._welSelectedTab.removeClass(sPrefix&nbsp;+&nbsp;&#39;selected&#39;);
		}
		this._welSelectedTab&nbsp;=&nbsp;welTab;
		welTab.addClass(sPrefix&nbsp;+&nbsp;&#39;selected&#39;);
		
		var&nbsp;welPanel&nbsp;=&nbsp;jindo.$Element(elPanel);
		if&nbsp;(this._welSelectedPanel)&nbsp;{
			this._welSelectedPanel.removeClass(sPrefix&nbsp;+&nbsp;&#39;selected&#39;);
		}
		this._welSelectedPanel&nbsp;=&nbsp;welPanel;
		welPanel.addClass(sPrefix&nbsp;+&nbsp;&#39;selected&#39;);
		
		this._nCurrentIndex&nbsp;=&nbsp;nIndex;
		
		if&nbsp;(bFireEvent)&nbsp;{
			/**
				탭이&nbsp;선택된&nbsp;후
				
				@event&nbsp;select
				@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
				@param&nbsp;{Number}&nbsp;nIndex&nbsp;선택된&nbsp;탭의&nbsp;인덱스
				@param&nbsp;{HTMLElement}&nbsp;elTab&nbsp;선택된&nbsp;탭
				@param&nbsp;{HTMLElement}&nbsp;elPanel&nbsp;선택된&nbsp;패널
				@example
					//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
					oTabControl.attach(&quot;select&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
			**/
			this.fireEvent(&quot;select&quot;,&nbsp;{
				nIndex&nbsp;:&nbsp;nIndex,
				elTab&nbsp;:&nbsp;elTab,
				elPanel&nbsp;:&nbsp;elPanel
			});
		}
	},
	
	/**
		컴포넌트의&nbsp;베이스&nbsp;엘리먼트를&nbsp;가져온다.
		
		@method&nbsp;getBaseElement
		@return&nbsp;{HTMLElement}
	**/
	getBaseElement&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;this._el;
	},
	
	/**
		컴포넌트를&nbsp;활성화한다.
		@return&nbsp;{this}
	**/
	_onActivate&nbsp;:&nbsp;function()&nbsp;{
		jindo.$Element.prototype.preventTapHighlight&nbsp;&amp;&amp;&nbsp;jindo.$Element(this._el).preventTapHighlight(true);
		this._wfEventTab.attach(this._el,&nbsp;this.option(&quot;sCheckEvent&quot;));
	},
	
	/**
		컴포넌트를&nbsp;비활성화한다.
		@return&nbsp;{this}
	**/
	_onDeactivate&nbsp;:&nbsp;function()&nbsp;{
		jindo.$Element.prototype.preventTapHighlight&nbsp;&amp;&amp;&nbsp;jindo.$Element(this._el).preventTapHighlight(false);
		this._wfEventTab.detach(this._el,&nbsp;this.option(&quot;sCheckEvent&quot;));
	},
	
	_onEventTab&nbsp;:&nbsp;function(we)&nbsp;{
		if&nbsp;(this.fireEvent(we.type,&nbsp;{&nbsp;weEvent&nbsp;:&nbsp;we&nbsp;}))&nbsp;{
			var&nbsp;sPrefix&nbsp;=&nbsp;this.option(&#39;sClassPrefix&#39;),
				el&nbsp;=&nbsp;we.element,
				elTab&nbsp;=&nbsp;jindo.$$.test(el,&nbsp;&#39;.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;tab&#39;)&nbsp;?&nbsp;el&nbsp;:&nbsp;jindo.$$.getSingle(&#39;!&nbsp;.&#39;&nbsp;+&nbsp;sPrefix&nbsp;+&nbsp;&#39;tab&#39;,&nbsp;el);
				
			if&nbsp;(elTab)&nbsp;{
				this._selectTab(elTab);	
			}
		}
	}
}).extend(jindo.UIComponent);</pre>
		</div>
	</div>
</div>

			</div>
		</div>
		<!-- // main content -->

	</div>
	<!-- // container -->

	<!-- footer -->
	<div id="footer">
		<p>Copyright ©<a href="http://nhncorp.com/" target="_blank">NHN Corp.</a> Platform Ajax Team. All Rights Reserved.</p>
	</div>
	<!-- // footer -->

</div>
<!-- // wrap -->

<style type="text/css">

	.item {
		transition:background .2s linear;
		-webkit-transition:background .2s linear;
		-moz-transition:background .2s linear;
		-o-transition:background .2s linear;
		-ms-transition:background .2s linear;
	}
	
	.highlight {
		background-color:#ffffd8 !important;
	}
	
	li.selected a.highlight {
		background-color:#aa8 !important;
	}
	
	.hide-deprecated .deprecated-item, .hide-inherited .inherited-item, .private {
		display:none;
	}
	
	.scrollbar-v, .scrollbar-h { display:none; }
	.scrollbar-show { display:block; }
	
	.api-page .tbl_fold .more_history { display:none; }
	
	/* FILE */
	.file pre.code {
		border:1px solid #ccc;
		padding:0;
	}
	
	.file ol {
		padding-left: 4em;
		background-color: #f9f9f9;
	}

	.file ol li {
		list-style: decimal;
		border-left:1px solid #ccc;
		padding:2px 4px;
	}
	
	.file li.L1, .file li.L3, .file li.L5, .file li.L7, .file li.L9 {
		background-color: #f9f9f9;	
	}

	.file li.L0, .file li.L2, .file li.L4, .file li.L6, .file li.L8 { 
		background-color: #f0f0f0;
	}
	
</style>
<script type="text/javascript" src="../assets/prettify/prettify-min.js"></script>
<script type="text/javascript" src="../assets/hash.js"></script>
<script type="text/javascript" src="../assets/api-list.js"></script>
<script type="text/javascript" src="../assets/api-search.js"></script>
<script type="text/javascript" src="../assets/../api.js?callback=APISearch.setData"></script>
<script type="text/javascript">
	var projectRoot = "../";
	var projectAssets = "../assets";
	
    apiDocs(projectAssets);	
</script>
</body>
</html>